<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台人员查看详情信息</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
</head>
<body style="background-color: #F9F9F9">
    <!--展示账号-->

    <!--主体-->
    <from class="layui-form">
    <div>
        <div style="width: 200px;height: 130px;margin: 0 auto">
            <img id="acatarUrl" src="" style="width:100px; height:100px; border-radius:50%; margin-left: 50px">
            <h2>账号:<strong><span id="account"></span></strong>的详情信息</h2>
        </div>
        <div class="layui-form-item" style="margin-top: 15px">

            <label class="layui-form-label">账号:</label>
            <div class="layui-input-inline">
                <input name="account" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">用户昵称:</label>
            <div class="layui-input-inline">
                <input name="trueName" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">性别:</label>
            <div class="layui-input-inline">
                <input name="sex" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">手机号:</label>
            <div class="layui-input-inline">
                <input name="phone" class="layui-input" disabled="disabled">
            </div>


        </div>
        <div class="layui-form-item" style="margin-top: 15px">

            <label class="layui-form-label">身份证号:</label>
            <div class="layui-input-inline">
                <input name="idCard" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">出生日期:</label>
            <div class="layui-input-inline">
                <input name="birthDate" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">所属部门:</label>
            <div class="layui-input-inline">
                <input name="deptName" class="layui-input" disabled="disabled">
            </div>
            <label class="layui-form-label">注册时间:</label>
            <div class="layui-input-inline">
                <input name="registerDate" class="layui-input" disabled="disabled">
            </div>


        </div>
        <div class="layui-form-item" style="margin-top: 15px">

            <label class="layui-form-label">注册ip:</label>
            <div class="layui-input-inline">
                <input name="registerIp" class="layui-input" style="width: 500px;" disabled="disabled">
            </div>

            <label class="layui-form-label" style="margin-left: 310px">邮箱:</label>
            <div class="layui-input-inline">
                <input name="email" class="layui-input" style="width: 500px;" disabled="disabled">
            </div>

        </div>
        <div class="layui-form-item" style="margin-top: 15px">

            <label class="layui-form-label">个性签名:</label>
            <div class="layui-input-inline">
                <textarea name="freestyle" class="layui-textarea" style="width: 1120px" disabled="disabled"></textarea>
            </div>

        </div>

    </div>


    <!--确定取消-->
    <div style="float: right; margin-bottom: 10px;margin-right: 32px">
        <button type="button" onclick="sub()" class="layui-btn">确定</button>
        <button type="button" onclick="cancel()" class="layui-btn layui-btn-warm">取消</button>
    </div>
    </from>
</body>
<script>

    layui.use(['layer','jquery'],function(){
        var layer = layui.layer,
            $ = layui.$;

        var userId = parent.$('#userId').val();


        //获取当前用户信息
        $.ajax({
             url: '/jurisdiction/getUserById'
            ,data: {'userId': userId}
            ,datType: 'json'
            ,success:function(data){
                var user = data.data;

                $('#acatarUrl').attr('src',user.acatarUrl);
                $('#account').text(user.account);
                $('#name').text(user.trueName);
                $('input[name=account]').val(user.account);
                $('input[name=trueName]').val(user.trueName);
                $('input[name=sex]').val(user.sex);
                $('input[name=phone]').val(user.phone);
                $('input[name=idCard]').val(user.idCard);
                $('input[name=birthDate]').val(user.birthDate);
                $('input[name=deptName]').val(user.deptName);
                $('input[name=registerDate]').val(user.registerDate);
                $('input[name=registerIp]').val(user.registerIp);
                $('input[name=email]').val(user.email);

                $('textarea[name=freestyle]').val(user.freestyle);

            }
        });




        //确定
        sub = function sub(){
            var layer = parent.layer;
            layer.close(layer.index);
        }

        //取消
        cancel = function cancel(){
            var layer = parent.layer;
            layer.close(layer.index);
        }


    });

</script>
</html>